package code;

public class MovablePoint implements Movable{
	int x;
    int y;
    int xSpeed;
    int ySpeed;
	public  MovablePoint(int x, int y, int xSpeed, int ySpeed){
		this.x=x;
		this.y=y;
		this.xSpeed=xSpeed;
		this.ySpeed=ySpeed;
	}
	public String toString(){
		String str="x:"+x+",xSpeed:"+xSpeed+",y:"+y+",ySpeed:"+ySpeed;
		return str;
	}
	public void  moveUp(){
		y+=ySpeed;
	}
	public void moveDown(){
		y-=ySpeed;
	}
	public void moveLeft(){
		x-=xSpeed;
	}
	public void moveRight(){
		x+=xSpeed;
	}
}
